#include <stdio.h>
#include <math.h>

#define N 10000

int main (int argc, char *argv[])
{
	FILE *fp;
	char buf[256];
	int i, n;
	float score[N], avg, sd;

	n = 0;
	fp = fopen (argv[1], "r");
	while (fgets (buf, 256, fp))
	{
		if (strncmp (buf, "c Cascade-like score", 20))
			continue;
		sscanf (buf + 21, "%f", &score[n]);
		n ++;
	}
	fclose (fp);

	avg = 0.0;
	for (i = 0; i < n; i++)
	{
		avg += score[i];
	}
	avg /= n;

	sd = 0.0;
	for (i = 0; i < n; i++)
	{
		sd += (score[i] - avg) * (score[i] - avg);
	}
	sd /= n;
	sd = sqrtf (sd);

	printf ("%s %5.2f %5.2f\n", argv[1], avg, sd);
}
